<?PHP
	class Session {
		var $sessionActive;
/*		function Session(){
			if(!isset( $_SESSION )) session_start();
		}*/
		function start(){
			if(!isset( $_SESSION )) session_start();
		}
		function getId(){
			return session_id();
		}
		function checkId($id){
			if(Session::getId()!=$id){
				Session::destroy();
			}
		}
		function set($varName,$varValue){
			$_SESSION[$varName] = $varValue;
		}
		function exists($varName){
			return isset($_SESSION[$varName]);
		}
		function del($varName){
			session_unregister($varName);
		}
		function get($varName){
			if(isset($_SESSION[$varName])){
				return $_SESSION[$varName];
			}else{
				return FALSE;
			}
		}
		function destroy(){
			session_unset();
			session_destroy();
		}
	}
?>